<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateCirclesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('circles', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('user_id')->comment('用户id');
            $table->unsignedBigInteger('community_id')->comment('社区id');
            $table->string('avatar')->comment('头像');
            $table->string('name',100)->comment('品牌名称');
            $table->string('address',150)->comment('地址');
            $table->char('tel',11)->comment('联系电话');
            $table->char('poster',100)->comment('海报');
            $table->unsignedTinyInteger('order_notify')->default(0)->comment('订单开关：0-关，1-开');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('circles');
    }
}
